@extends('admin.inc.base')
@section('content')
    <table class="table">
        <tr>
            <th>序号</th>
            <th>标题</th>
            <th>访问地址(<span style="color:red;">用于在编辑页面的时候调用</span>)</th>
            <th>创建时间</th>
            <th>更新时间</th>
            <th>操作</th>
        </tr>
        @foreach($data as $key => $val)
            <tr>
                <td>{{ $key }}</td>
                <td>{{ $val -> title }}</td>
                <td>{{env('APP_URL')}}/page/{{ $val->id}} &nbsp;<a href="{{env('APP_URL')}}/page/{{ $val->id}}" target="_blank">查看</a></td>
                <td>{{ $val -> created_at }}</td>
                <td>{{ $val -> updated_at }}</td>
                <td><a href="/edit/{{ $val ->id }}">编辑</a>&nbsp;<a href="/administrator/page/{{ $val ->id }}/delete">删除</a></td>
            </tr>
        @endforeach
    </table>
@endsection